<?php $this->context->layout = 'form';?>
<style>
    #container {
        width: 100%;
        height: 1000px;
    }
</style>
<form class="form-horizontal m" id="form-admin-add">
    <?= \common\widgets\FormInput::widget(['name'=>'forminput|校区名称','extend'=>['name'=>'name','required'=>1]])?>
    <?= \common\widgets\FormInput::widget(['name'=>'forminput|联系人','extend'=>['name'=>'contacts','required'=>1]])?>
    <?= \common\widgets\FormInput::widget(['name'=>'forminput|手机号','extend'=>['name'=>'phone','required'=>1]])?>
    <?= \common\widgets\FormInput::widget(['name'=>'formradio|状态','extend'=>['name'=>'status','required'=>1,'value'=>1]])?>
    <input type="hidden" id="province" name="province" value="">
    <input type="hidden" id="city" name="city" value="">
    <input type="hidden" id="county" name="county" value="">
    <input type="hidden" id="street" name="street" value="">
    <input type="hidden" id="address" name="address" value="">
    <input type="hidden" id="long" name="longitude" value="">
    <input type="hidden" id="lat" name="latitude" value="">
    <?= \common\widgets\FormInput::widget(['name' => 'forminput|地址', 'extend' => ['name' => 'addr', 'id' => 'tipinput', 'required' => 1, 'tips' => '请输入完整地址，便于定位，下方地图可以点击选择', 'sm' => 3]]) ?>
    <div class="form-group mb0"><div id="addr" style="font-size: large;margin: 10px 62px;"></div></div>
    <?= $this->render('/iframe',['name'=>'tabfooter'])?>
    <div id="container"></div>
</form>

<?php $this->beginBlock('script'); ?>
<script>
    var mapkey = "<?=$map_key?>"
    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(oasUrl, $('#form-admin-add').serialize());
        }
    }
</script>
<script src="<?= yii\helpers\Url::to('@appweb/public/static/admin/js/longlat.js') ?>"></script>
<?php $this->endBlock(); ?>
